#-------------------------------------------------------------------
# Project:     Assult on the over world
# Name:        game.py
# Purpose:     An Enemy Object
# 
# Authors:     Chris Lheureux, Matt Hahn, Tyler Plante, Jackson Morse
# Main Author: Jackson morse
#
# Created:     3/5/13
# Copyright:   (c) Jackson morse
# License:     GSL
#-------------------------------------------------------------------
import pygame, math, sys, random
from BaseBoss import BaseBoss

class Boss_Hydra(BaseBoss):
    def __init__(self, position, screenSize):
        Boss_Hydra.__init__(self, [0,0], position, screenSize)
        self.images = []
        self.images += [pygame.image.load("rsc/Boss_Hydra/Boss_Hydra.png")]
        self.image = self.images[self.frame]
        self.rect = self.image.get_rect()
        self.place(position)
        self.radius = self.rect.width/2.5
        self.maxSpeed = 8
        self.x = position[0]
        self.realx = 0
        self.scrollThreshold = 250
        self.scrolling = False

    def direction(self, dir):
        if dir == "left":
            self.speed = [-self.maxSpeed, 0]
        elif dir == "right":
            self.speed = [self.maxSpeed, 0]
        elif dir == "stop":
            self.speed = [0,0]
        elif dir == "South":
			self.speed = [0,0]
				
				
	 def Shoot(self, target, position):
        tX = target[0]
        tY = target[1]
        mX = position[0]
        mY = position[1]
        speed = [0,0]
        if tX > mX + 5:
            speed[0] = 10
        elif tX < mX -5:
            speed[0] = -10
        else:
            speed[0] = 0
    
        if tY > mY + 5:
            speed[1] = 10
        elif tY < mY - 5:
            speed[1] = -10
        else:
            speed[1] = 0
        
        return speed